<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>QiYe_List.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript">
	
		function checkbox_check(id) {
			var boxes = document.getElementsByName("myCheckbox");
			for (var i = 0; i < boxes.length; i++) {
				if (boxes[i].id == id) {
					boxes[i].checked = true;
					document.getElementById("id").value = id;
				} else {
					boxes[i].checked = false;
				}
			}		

			//alert(id);
		}
		
		function myForm1_submit(id) {
			var QiYeID = document.getElementById("id").value;
			if (QiYeID == "") {
				alert("请选择要查看的企业");
			} else {
				if (id == "QiYeLHXYXWJL") {
					alert("跳转到企业id为" + QiYeID + "的表彰信息页面");
				}
				if (id == "QiYeBLXYXWJL") {
					alert("跳转到企业id为" + QiYeID + "的不良信息页面");
				}
				if (id == "QiYeZZ") {
					alert("跳转到企业id为" + QiYeID + "的企业资质页面");
				}
				if (id == "DaiBiaoGC") {
					alert("跳转到企业id为" + QiYeID + "的代表工程页面");
				}
			}
		}
		
		function QiYe_InsertOrUpdate() {
			myForm1.action = "QiYe_InsertOrUpdate.html";
			myForm1.target = "_blank";
			myForm1.submit();
		}
		
		function QiYe_Delete() {
			var QiYeID = document.getElementById("id").value;
			if (QiYeID == "") {
				alert("请选择要删除的企业");
			} else {
				if(window.confirm("确定删除？")) {
					var tr = document.getElementById("tr" + QiYeID);
					var tbody = document.getElementById("myForm2_table").lastChild;
					tbody.removeChild(tr);
				}				
			}		
		}
	</script>
  </head>
  
  <body>
  
  	<form action="" method="post" name="myForm1">
  		<input type="hidden" name="id" value="" />
  		<table>
  			<tr>
  				<td><input type="text" name="test" /></td>
    			<td><input type="button" value="增加企业信息" onclick="QiYe_InsertOrUpdate();" /></td>
    			<td><input type="button" value="修改企业信息" /></td>
    			<td><input type="button" value="删除企业信息" onclick="QiYe_Delete();" /></td>
    			<td><input type="button" id="QiYeLHXYXWJL" value="查看企业表彰信息" onclick="myForm1_submit(id);"/></td>
    			<td><input type="button" id="QiYeBLXYXWJL" value="查看企业不良信息" onclick="myForm1_submit(id);"/></td>
    			<td><input type="button" id="QiYeZZ" value="查看企业资质信息" onclick="myForm1_submit(id);"/></td>
    			<td><input type="button" id="DaiBiaoGC" value="查看代表工程信息" onclick="myForm1_submit(id);"/></td>
    		</tr>  		
  		</table>
  	</form>
  	
  	<form action="" method="post" name="myForm2">
  		<table id="myForm2_table" border="1">
  			<tbody>
  			<tr id="tr1">
  				<td><input type="checkbox" name="myCheckbox" id="1" onclick="checkbox_check(1);" /></td>
    			<td><a href="#">企业信息1</a></td>			
    		</tr>
    		<tr id="tr2">
    			<td><input type="checkbox" name="myCheckbox" id="2" onclick="checkbox_check(2);"/></td>
    			<td><a href="#">企业信息2</a></td>
    		</tr>
    		<tr id="tr3">
    			<td><input type="checkbox" name="myCheckbox" id="3" onclick="checkbox_check(3);" /></td>
    			<td><a href="#">企业信息3</a></td>
    		</tr>		
  			</tbody>			
  		</table>
  	</form>  
  	
<!-- 	<form action="" method="post" name="myForm3">-->
<!-- 		<input type="hidden" name="id" value="" />-->
<!--  		<table>-->
<!--  			<tr>-->
<!--    			<td><input type="button" id="QiYeLHXYXWJL" value="查看企业表彰信息记录" onclick="myForm3_submit(id);"/></td>-->
<!--    		</tr>-->
<!--  		</table>-->
<!--  		<table>-->
<!--  			<tr>-->
<!--    			<td><input type="button" id="QiYeBLXYXWJL" value="查看企业不良信息记录" onclick="myForm3_submit(id);"/></td>-->
<!--    		</tr>-->
<!--  		</table>-->
<!--  	</form>-->
  </body>
</html>
